package homework.mid_autumn_festival.io_exercise;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OosDemo {
    public static void main(String[] args) throws IOException {
        String name = "大海";
        int age = 47;
        String gender = "男";
        String[] otherInfo = {"帅","有钱","游戏打的好"};
        Person per = new Person(name,age,gender,otherInfo);
        FileOutputStream fos = new FileOutputStream("ppp.obj");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(per);
        System.out.println("序列化完毕");
        oos.close();

    }
}
